package com.car.rental.order.service;

import com.car.rental.common.core.response.ResponseResult;
import com.car.rental.order.dto.PaymentDTO;
import com.car.rental.order.entity.PaymentRecord;

public interface PaymentService {
    /**
     * 创建支付记录
     */
    ResponseResult<String> createPayment(Long userId, PaymentDTO paymentDTO);
    
    /**
     * 支付成功回调
     */
    ResponseResult<Void> paymentSuccess(String paymentNo);
    
    /**
     * 支付失败回调
     */
    ResponseResult<Void> paymentFailed(String paymentNo, String reason);
    
    /**
     * 查询支付状态
     */
    ResponseResult<Integer> getPaymentStatus(String orderNo);

    /**
     * 根据支付流水号获取支付记录
     */
    PaymentRecord getByPaymentNo(String paymentNo);

    /**
     * 更新支付记录
     */
    boolean updateById(PaymentRecord payment);
} 